import {
    GraphQLString
} from 'graphql';

import {
    myHttp
} from '../../tools/myHttp'

export const info = {
    type: GraphQLString,
    args: {
        QueryType: {
            type: GraphQLString
        },
        ProductSn: {
            type: GraphQLString
        }
    },
    resolve(root, params, options) {
        return myHttp({
            QueryType: params.QueryType,
            ProductSn: params.ProductSn,
        })
    }
}

export const qudong = {
    type: GraphQLString,
    args: {
        OSTypeId: {
            type: GraphQLString
        },
        SN: {
            type: GraphQLString
        }
    },
    resolve(root, params, options) {
        return myHttp({
            SearchType: "2",
            LogicType: "1",
            OSTypeId: params.OSTypeId,
            SN: params.SN,
            IsBackPage: false,
            IsSeachOne: true
        }, "/lenovo/wsi/Modules/Manage/GetDriverList.aspx")
    }
}
